<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>User List</title>
    <style>
        table {
            width: 100%;
            border-collapse: collapse;
        }

        table, th, td {
            border: 1px solid black;
            padding: 8px;
            text-align: left;
        }

        tr:nth-child(even) {
            background-color: #f2f2f2;
        }

        th {
            background-color: #4CAF50;
            color: white;
        }
    </style>
</head>
<body>
<table>
    <thead>
    <tr>
        <th>序号</th>
        <th>用户名</th>
        <th>性别</th>
        <th>职业</th>
        <th>爱好</th>
        <th>个人信息</th>
        <th>权限</th>
        <th>状态</th>
    </tr>
    </thead>
    <tbody>
    <c:forEach items="${searchResults}" var="user" varStatus="row">
        <tr>
            <td>${user.id}</td>
            <td>${user.username}</td>
            <td>${user.gender}</td>
            <td>${user.profession}</td>
            <td>${user.favor}</td>
            <td>${user.description}</td>
            <td>${user.role}</td>
            <td>${user.state}</td>
        </tr>


    </c:forEach>
    </tbody>
</table>
</body>
</html>
